# 绘制中国国旗
from turtle import *
speed(5)
title("祖国万岁")
 
def draw():
    #红色国旗面
    up()
    goto(-200, 200)
    down()
    begin_fill()
    fillcolor("red")
    pencolor("red")
    for i in range(2):
        forward(380)
        right(90)
        forward(253)
        right(90)
    end_fill()
 
    # 第一个大五角星
    up()
    goto(-170, 145)
    down()
    begin_fill()
    fillcolor("yellow")
    pencolor("yellow")
    for x in range(5):
        forward(70)
        right(144)
    end_fill()
 
    # 第一个小五角星
    up()
    goto(-90, 175)
    down()
    begin_fill()
    fillcolor("yellow")
    pencolor("yellow")
    for x in range(5):
        forward(20)
        right(144)
    end_fill()
 
    # 第二个小五角星
    up()
    goto(-60, 150)
    down()
    begin_fill()
    fillcolor("yellow")
    pencolor("yellow")
    for x in range(5):
        forward(20)
        right(144)
    end_fill()
 
    # 第三个小五角星
    up()
    goto(-60, 110)
    down()
    begin_fill()
    fillcolor("yellow")
    pencolor("yellow")
    for x in range(5):
        forward(20)
        right(144)
    end_fill()
 
    # 第四个小五角星
    up()
    goto(-90, 85)
    down()
    begin_fill()
    fillcolor("yellow")
    pencolor("yellow")
    for x in range(5):
        forward(20)
        right(144)
    end_fill()
 
    hideturtle()  # 隐藏海龟
    done()
 
 
if __name__ == '__main__':
    draw()

